package com.travel.service.Service;

import com.travel.model.dto.comment.CommentRequest;
import com.travel.model.dto.comment.RatingStats;
import com.travel.model.dto.post.PostDTO;
import com.travel.model.entity.content.Comment;
import com.travel.model.entity.content.Post;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
//文章服务 获取所有文章 获取特定城市文章 获取特定文章 创建文章 更新文章 删除文章 搜索文章 添加评论 获取评论 获取评分统计
public interface PostService {
    Page<Post> getAllPosts(Pageable pageable);
    Page<Post> getPostsByCity(String city, String category, Pageable pageable);
    PostDTO createPost(PostDTO postDTO);
    PostDTO updatePost(Long id, PostDTO postDTO);
    void deletePost(Long id);
    Page<Post> searchPosts(String keyword, Pageable pageable);
    List<Post> findHotPosts(Pageable pageable);
    List<Post> findLatestPosts(Pageable pageable);
    Page<Post> getCurrentUserPosts(Pageable pageable);
    Comment addComment(Long postId, CommentRequest request);
    List<Comment> getComments(Long postId);
    void deleteComment(Long commentId, Long userId);
    Post getPost(Long id);
    void updatePostStatus(Long id, Integer status);
    RatingStats getPostRating(Long postId);
    PostDTO getPostDetail(Long id);
} 